﻿@{
    ViewBag.Title = "FeatureComparison";
}

<section id="FeatureComparison">
    <div class="clearfix">
        <textarea id="text" rows="10"></textarea>
        <a href="javascript:void(0)" class="easyui-linkbutton pull-right">分词</a>
    </div>
    <div id="result">

    </div>
</section>

<style type="text/css">
    #FeatureComparison textarea {
        width: 100%;
    }
</style>
<script type="text/javascript">
    $('.easyui-linkbutton', '#FeatureComparison').click(function () {
        var $result = $('#result', '#FeatureComparison').html('');

        var text = $('#text').val();

        var actions = ['Simple'];
        $.each(actions, function (i, action) {
            $.ajax({
                url: '/Laboratory/PanGuSegment/' + action + 'Segment/',
                type: 'POST',
                async: true,
                data: {
                    text: text
                }
            }).then(function (data) {
                $('<div />').addClass('pull-left')
                    .html(action + ':<br />' + data)
                    .appendTo($result);
            });
        });
    });
</script>